﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using JXT.PrimaryKey.Batman.Core.Security;
using JXT.PrimaryKey.Batman.Core.WcfService;

namespace JXT.PrimaryKey.Batman.WcfService.Models.UserSystem
{
    [DataContract(Namespace = ServiceEnvironment.ModelNamespace)]
    public class LoginStatus
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        [DataMember]
        public int UserId { get; set; }

        /// <summary>
        /// 令牌
        /// </summary>
        [DataMember]
        public string Token { get; set; }

        /// <summary>
        /// 登陆时间
        /// </summary>
        [DataMember]
        public DateTime LoginTime { get; set; }

        /// <summary>
        /// 登录Ip
        /// </summary>
        [DataMember]
        public string LoginIp { get; set; }

        /// <summary>
        /// 最后活动时间
        /// </summary>
        [DataMember]
        public DateTime LastActiveTime { get; set; }

        /// <summary>
        /// 最后活动Ip
        /// </summary>
        [DataMember]
        public string LastActiveIp { get; set; }

        /// <summary>
        /// 过期时间，默认为DateTime.MaxValue
        /// </summary>
        [DataMember]
        public DateTime Expires { get; set; }
    }
}
